Get rid of delay between finishing the transfer of a domain and when it gets to run.
op.u.builddomain.ctxt = &ctxt;
rc = do_dom0_op(xc_handle, &op);
- /* don't start the domain as we have console etc to set up */
-
+ if ( rc != 0 )
+ {
+ xcio_error(ioctxt, "Couldn't build the domain");
+ goto out;
+ }
+
+ if ( ioctxt->flags & XCFLAGS_CONFIGURE )
+ {
+ op.cmd = DOM0_UNPAUSEDOMAIN;
+ op.u.unpausedomain.domain = (domid_t)dom;
+ rc = do_dom0_op(xc_handle, &op);
+ }
+
if ( rc == 0 )
{
/* Success: print the domain id. */
ioctxt->info = iostdout;
ioctxt->err = iostderr;
ioctxt->configure = domain_configure;
- if(!configured){
+ if ( !*configured )
ioctxt->flags |= XCFLAGS_CONFIGURE;
- }
err = xc_linux_restore(xcinit(), ioctxt);
*dom = ioctxt->domain;
dprintf("> Configuring...\n");
err = xen_domain_configure(state->vmid_new, state->vmconfig, state->vmconfig_n);
if(err) goto exit;
+ err = xen_domain_unpause(state->vmid_new);
+ if(err) goto exit;
}
- err = xen_domain_unpause(state->vmid_new);
- if(err) goto exit;
// Report new domain id to peer.
err = xfr_send_xfr_ok(peer, state->vmid_new);
if(err) goto exit;